<html>
<body>
<?php 
 //create database
 $con = mysql_connect("localhost","root","");
 if (!$con){
    die("Could not connect: ". mysql_error());
 }
 
 //create database
    
 //create table
    mysql_select_db("workshop", $con);
    $first = "CREATE TABLE staffinfo
    (
    id int NOT NULL AUTO_INCREMENT,
    PRIMARY KEY(id),
    name varchar(15),
    password varchar(15),
    position varchar(20),
    email varchar(25),
    image varchar(30),
    sex char,
    birth varchar(10),
    level varchar(15)
    )";
    $second = "CREATE TABLE taskinfo
    (
    tid int NOT NULL AUTO_INCREMENT,
    PRIMARY KEY(tid),
    id int,
    sname varchar(15),
    mname varchar(15),
    date varchar(15),
    content varchar(100),
    state varchar(15)
    )";
    $third = "CREATE TABLE qiandaoinfo
    (
    id int,
    name varchar(15),
    year varchar(4),
    month varchar(2),
    date varchar(2),
    start varchar(10),
    finish varchar(10)
    )";
// Execute query
    if(mysql_query($first, $con)) echo "Correct.";
    if(mysql_query($second, $con)) echo "Correct.";
    if(mysql_query($third, $con)) echo "Correct.";
    mysql_close($con);


?>
</body>
</html>